﻿using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using JSMVP.Domain;

namespace JSMVP.Tests
{
    [TestFixture]
    public class CartTester
    {
        [Test]
        public void SubTotalTest(){
            Cart cart = new Cart();
            CartItem item1 = new CartItem();
            Product p1 = new Product();
            p1.Price = 15.00;
            
            CartItem item2 = new CartItem();
            Product p2 = new Product();
            p2.Price = 5.00;
            
            item1.product = p1;
            item1.quantity = 1;
            
            item2.product = p2;
            item2.quantity = 2;
            
            cart.Items.Add(item1);
            cart.Items.Add(item2);
            
            Assert.That(cart.SubTotal == 25.00);
        }
    }
}
